import http from "../../utils/axios";

// 上传轮播图
export const uploadSwiperAPI = (data: any) =>
  http<any, any>({
    url: "/set/uploadSwiper",
    method: "POST",
    data,
  });
// 获取全部轮播图
export const getAllSwiperAPI = () =>
  http<any, any>({
    url: "/set/getAllSwiper",
    method: "POST",
  });
// 获取公司名称
export const getCompanyNameAPI = () =>
  http<any, any>({
    url: "/set/getCompanyName",
    method: "POST",
  });
// 修改公司名称
export const changeCompanyNameAPI = (set_value: any) =>
  http<any, any>({
    url: "/set/changeCompanyName",
    method: "POST",
    data: {
      set_value,
    },
  });
// 编辑公司介绍接口
export const changeCompanyIntroduceAPI = (set_text: any, set_name: any) =>
  http<any, any>({
    url: "/set/changeCompanyIntroduce",
    method: "POST",
    data: {
      set_text,
      set_name,
    },
  });
// 获取公司介绍
export const getCompanyIntroduceAPI = (set_name: any) =>
  http<any, any>({
    url: "/set/getCompanyIntroduce",
    method: "POST",
    data: {
      set_name,
    },
  });
// 获取所有公司信息
export const getAllCompanyIntroduceAPI = () =>
  http<any, any>({
    url: "/set/getAllCompanyIntroduce",
    method: "POST",
  });
// 部门设置
export const setDepartmentAPI = (data: any) =>
  http<any, any>({
    url: "/set/setDepartment",
    method: "POST",
    data: {
      set_value: data,
    },
  });
// 产品设置
export const setProductAPI = (data: any) =>
  http<any, any>({
    url: "/set/setProduct",
    method: "POST",
    data: {
      set_value: data,
    },
  });
// 获取部门
export const getDepartmentAPI = () =>
  http<any, any>({
    url: "/set/getDepartment",
    method: "POST",
  });
// 获取产品
export const getProductAPI = () =>
  http<any, any>({
    url: "/set/getProduct",
    method: "POST",
  });
